package com.itlong.cloud.sdk.service;

import com.itlong.cloud.POJO.DTO.sdk.CloudTalkSDKAppUserLoginDTO;
import com.itlong.cloud.POJO.PO.PropertyUserInfoPO;
import com.itlong.cloud.POJO.VO.sdk.CloudTalkSDKAppDemoLoginVO;
import com.itlong.cloud.POJO.VO.sdk.CloudTalkSDKAppUserVO;
import org.apache.ibatis.annotations.Param;

import java.io.UnsupportedEncodingException;

/**
 * <desc>
 *      云对讲SDK用户业务处理接口
 * </desc>
 *
 * @createDate 2018/05/11
 */
public interface ICloudTalkSDKAppUserService {
    /**
     * <desc>
     *      云对讲SDK认证
     * </desc>
     *
     * @param dto
     * @return
     * @author Jiaqi.X
     * @createDate 2018/05/11
     */
    CloudTalkSDKAppUserVO authentication(CloudTalkSDKAppUserLoginDTO dto) throws UnsupportedEncodingException;

    /**
     * <desc>
     *      云对讲SDK登出
     * </desc>
     *
     * @param token
     * @author Jiaqi.X
     * @createDate 2018/05/14
     */
    void logout(String token);

    /**
     * <desc>
     *      从缓存中获取用户信息
     * </desc>
     *
     * @param token 用户token
     * @return
     * @author Jiaqi.X
     * @createDate 2018/05/14
     */
    CloudTalkSDKAppUserVO retrieve(String token);

    /**
     * <desc>
     *      通过手机号获取app用户id
     * </desc>
     *
     * @param phoneNum
     * @return
     * @author Jiaqi.X
     * @createDate 2018/05/14
     */
    String getUserIdByPhoneNum(String phoneNum);

    /**
     * <desc>
     *      demo登录
     * <desc/>
     *
     * @return 云对讲SDK APP demo登录VO对象
     * @author wangzhi
     * @createDate 2018/11/21
     */
    CloudTalkSDKAppDemoLoginVO cloudTalkLogin(String phoneNo, String pswd) throws Exception;

    /**
     * <desc>
     *      SDK开发者认证
     * <desc/>
     *
     * @return propertyUserInfoPO
     * @return robotId 机器人编号
     * @author Qiang.S
     * @createDate 2019/09/16
     */
    String developerLogin(PropertyUserInfoPO propertyUserInfoPO,String robotId) throws Exception;

    /**
     * <desc>
     *      从缓存中获取开发者信息
     * </desc>
     *
     * @param token 用户token
     * @return
     * @author Qiang.S
     * @createDate 2019/09/16
     */
    PropertyUserInfoPO developerRetrieve(String token) throws Exception;

    /**
     * <desc>
     *      机器人调试工具开发者认证
     * <desc/>
     *
     * @return propertyUserInfoPO
     * @return robotId 机器人编号
     * @author Qiang.S
     * @createDate 2019/09/16
     */
    String robotGoDeveloperLogin(PropertyUserInfoPO propertyUserInfoPO,String robotId) throws Exception;
    /**
     *<desc>
     * 设置消息回调的url地址
     *</desc>
     *
     * @Author  chengshican
     * @Date   2020-11-19 19:27
     * @Param
     * @Return
     * @Exception
     *
     */

    Integer updateUserProjectByUserId( String updateMessageCallbackRrl, String projectId,String userId) throws Exception;

}
